home *** CD-ROM | disk | FTP | other *** search
/ PD Collection CD 1 / PD Collection CD 1.iso / textual / tex / files / !tex / TeXsource / web2ctex / ctex / c / tex8 < prev    next >
Encoding:
Text File  |  1989-09-20  |  44.2 KB  |  2,066 lines

  1. #define EXTERN extern
  2. #include "texd.h"
  3.  
  4. alteraux () {
  5.     alteraux_regmem 
  6.   halfword c  ; 
  7.   if ( curchr != abs ( curlist .modefield ) ) 
  8.   reportillegalcase () ; 
  9.   else {
  10.       
  11.     c = curchr ; 
  12.     scanoptionalequals () ; 
  13.     if ( c == 1 ) 
  14.     {
  15.       scandimen ( false , false , false ) ; 
  16.       curlist .auxfield = curval ; 
  17.     } 
  18.     else {
  19.     
  20.       scanint () ; 
  21.       if ( ( curval <= 0 ) || ( curval > 32767 ) ) 
  22.       {
  23.     {
  24.       if ( interaction == 3 ) 
  25.       wakeupterminal () ; 
  26.       printnl ( 133 ) ; 
  27.       print ( 1059 ) ; 
  28.     } 
  29.     {
  30.       helpptr = 1 ; 
  31.       helpline [ 0 ] = 1060 ; 
  32.     } 
  33.     interror ( curval ) ; 
  34.       } 
  35.       else curlist .auxfield = curval ; 
  36.     } 
  37.   } 
  38. alterprevgraf () {
  39.     alterprevgraf_regmem 
  40.   integer p  ; 
  41.   nest [ nestptr ] = curlist ; 
  42.   p = nestptr ; 
  43.   while ( abs ( nest [ p ] .modefield ) != 1 ) decr ( p ) ; 
  44.   scanoptionalequals () ; 
  45.   scanint () ; 
  46.   if ( curval < 0 ) 
  47.   {
  48.     {
  49.       if ( interaction == 3 ) 
  50.       wakeupterminal () ; 
  51.       printnl ( 133 ) ; 
  52.       print ( 802 ) ; 
  53.     } 
  54.     printesc ( 390 ) ; 
  55.     {
  56.       helpptr = 1 ; 
  57.       helpline [ 0 ] = 1061 ; 
  58.     } 
  59.     interror ( curval ) ; 
  60.   } 
  61.   else {
  62.       
  63.     nest [ p ] .pgfield = curval ; 
  64.     curlist = nest [ nestptr ] ; 
  65.   } 
  66. alterpagesofar () {
  67.     alterpagesofar_regmem 
  68.   schar c  ; 
  69.   c = curchr ; 
  70.   scanoptionalequals () ; 
  71.   scandimen ( false , false , false ) ; 
  72.   pagesofar [ c ] = curval ; 
  73. alterinteger () {
  74.     alterinteger_regmem 
  75.   schar c  ; 
  76.   c = curchr ; 
  77.   scanoptionalequals () ; 
  78.   scanint () ; 
  79.   if ( c == 0 ) 
  80.   deadcycles = curval ; 
  81.   else insertpenalties = curval ; 
  82. alterboxdimen () {
  83.     alterboxdimen_regmem 
  84.   smallnumber c  ; 
  85.   eightbits b  ; 
  86.   c = curchr ; 
  87.   scaneightbitint () ; 
  88.   b = curval ; 
  89.   scanoptionalequals () ; 
  90.   scandimen ( false , false , false ) ; 
  91.   if ( eqtb [ 4322 + b ] .hh .v.RH != 0 ) 
  92.   mem [ eqtb [ 4322 + b ] .hh .v.RH + c ] .cint = curval ; 
  93. znewfont ( a ) 
  94. smallnumber a ; 
  95. {/* 50 */ newfont_regmem 
  96.   halfword u  ; 
  97.   scaled s  ; 
  98.   internalfontnumber f  ; 
  99.   strnumber t  ; 
  100.   schar oldsetting  ; 
  101.   if ( jobname == 0 ) 
  102.   openlogfile () ; 
  103.   getrtoken () ; 
  104.   u = curcs ; 
  105.   if ( u >= 258 ) 
  106.   t = hash [ u ] .v.RH ; 
  107.   else if ( u >= 129 ) 
  108.   if ( u == 257 ) 
  109.   t = 1065 ; 
  110.   else t = u - 129 ; 
  111.   else {
  112.       
  113.     oldsetting = selector ; 
  114.     selector = 21 ; 
  115.     print ( 1065 ) ; 
  116.     print ( u - 1 ) ; 
  117.     selector = oldsetting ; 
  118.     {
  119.       if ( poolptr + 1 > poolsize ) 
  120.       overflow ( 128 , poolsize - initpoolptr ) ; 
  121.     } 
  122.     t = makestring () ; 
  123.   } 
  124.   if ( ( a >= 4 ) ) 
  125.   geqdefine ( u , 86 , 0 ) ; 
  126.   else eqdefine ( u , 86 , 0 ) ; 
  127.   scanoptionalequals () ; 
  128.   scanfilename () ; 
  129.   nameinprogress = true ; 
  130.   if ( scankeyword ( 1066 ) ) 
  131.   {
  132.     scandimen ( false , false , false ) ; 
  133.     s = curval ; 
  134.     if ( ( s <= 0 ) || ( s >= 134217728L ) ) 
  135.     {
  136.       {
  137.     if ( interaction == 3 ) 
  138.     wakeupterminal () ; 
  139.     printnl ( 133 ) ; 
  140.     print ( 1068 ) ; 
  141.       } 
  142.       printscaled ( s ) ; 
  143.       print ( 1069 ) ; 
  144.       {
  145.     helpptr = 2 ; 
  146.     helpline [ 1 ] = 1070 ; 
  147.     helpline [ 0 ] = 1071 ; 
  148.       } 
  149.       error () ; 
  150.       s = 10 * 65536L ; 
  151.     } 
  152.   } 
  153.   else if ( scankeyword ( 1067 ) ) 
  154.   {
  155.     scanint () ; 
  156.     s = - (integer) curval ; 
  157.     if ( ( curval <= 0 ) || ( curval > 32768L ) ) 
  158.     {
  159.       {
  160.     if ( interaction == 3 ) 
  161.     wakeupterminal () ; 
  162.     printnl ( 133 ) ; 
  163.     print ( 410 ) ; 
  164.       } 
  165.       {
  166.     helpptr = 1 ; 
  167.     helpline [ 0 ] = 411 ; 
  168.       } 
  169.       interror ( curval ) ; 
  170.       s = -1000 ; 
  171.     } 
  172.   } 
  173.   else s = -1000 ; 
  174.   nameinprogress = false ; 
  175.   {register integer for_end; f = 1 ; for_end = fontptr ; if ( f <= for_end) 
  176.   do 
  177.     if ( streqstr ( fontname [ f ] , curname ) && streqstr ( fontarea [ f ] , 
  178.     curarea ) ) 
  179.     {
  180.       if ( s > 0 ) 
  181.       {
  182.     if ( s == fontsize [ f ] ) 
  183.     goto lab50 ; 
  184.       } 
  185.       else if ( fontsize [ f ] == xnoverd ( fontdsize [ f ] , - (integer) s , 
  186.       1000 ) ) 
  187.       goto lab50 ; 
  188.     } 
  189.   while ( f++ < for_end ) ; } 
  190.   f = readfontinfo ( u , curname , curarea , s ) ; 
  191.   lab50: eqtb [ u ] .hh .v.RH = f ; 
  192.   eqtb [ 3268 + f ] = eqtb [ u ] ; 
  193.   hash [ 3268 + f ] .v.RH = t ; 
  194. newinteraction () {
  195.     newinteraction_regmem 
  196.   println () ; 
  197.   interaction = curchr ; 
  198.   if ( interaction == 0 ) 
  199.   selector = 16 ; 
  200.   else selector = 17 ; 
  201.   if ( jobname != 0 ) 
  202.   selector = selector + 2 ; 
  203. doassignments () {
  204.     /* 10 */ doassignments_regmem 
  205.   while ( true ) {
  206.       
  207.     do {
  208.     getxtoken () ; 
  209.     } while ( ! ( ( curcmd != 10 ) && ( curcmd != 0 ) ) ) ; 
  210.     if ( curcmd <= 69 ) 
  211.     return ; 
  212.     prefixedcommand () ; 
  213.   } 
  214. openorclosein () {
  215.     openorclosein_regmem 
  216.   schar c  ; 
  217.   schar n  ; 
  218.   c = curchr ; 
  219.   scanfourbitint () ; 
  220.   n = curval ; 
  221.   if ( readopen [ n ] != 2 ) 
  222.   {
  223.     aclose ( readfile [ n ] ) ; 
  224.     readopen [ n ] = 2 ; 
  225.   } 
  226.   if ( c != 0 ) 
  227.   {
  228.     scanoptionalequals () ; 
  229.     scanfilename () ; 
  230.     if ( curext == 206 ) 
  231.     curext = 644 ; 
  232.     packfilename ( curname , curarea , curext ) ; 
  233.     if ( aopenin ( readfile [ n ] , readpathspec ) ) 
  234.     readopen [ n ] = 1 ; 
  235.   } 
  236. issuemessage () {
  237.     issuemessage_regmem 
  238.   schar oldsetting  ; 
  239.   schar c  ; 
  240.   strnumber s  ; 
  241.   c = curchr ; 
  242.   mem [ memtop - 12 ] .hh .v.RH = scantoks ( false , true ) ; 
  243.   oldsetting = selector ; 
  244.   selector = 21 ; 
  245.   tokenshow ( defref ) ; 
  246.   selector = oldsetting ; 
  247.   flushlist ( defref ) ; 
  248.   {
  249.     if ( poolptr + 1 > poolsize ) 
  250.     overflow ( 128 , poolsize - initpoolptr ) ; 
  251.   } 
  252.   s = makestring () ; 
  253.   if ( c == 0 ) 
  254.   {
  255.     if ( termoffset + ( strstart [ s + 1 ] - strstart [ s ] ) > maxprintline - 
  256.     2 ) 
  257.     println () ; 
  258.     else if ( ( termoffset > 0 ) || ( fileoffset > 0 ) ) 
  259.     printchar ( 32 ) ; 
  260.     print ( s ) ; 
  261.     termflush ( stdout ) ; 
  262.   } 
  263.   else {
  264.       
  265.     {
  266.       if ( interaction == 3 ) 
  267.       wakeupterminal () ; 
  268.       printnl ( 133 ) ; 
  269.       print ( s ) ; 
  270.     } 
  271.     if ( eqtb [ 4065 ] .hh .v.RH != 0 ) 
  272.     useerrhelp = true ; 
  273.     else if ( longhelpseen ) 
  274.     {
  275.       helpptr = 1 ; 
  276.       helpline [ 0 ] = 1078 ; 
  277.     } 
  278.     else {
  279.     
  280.       if ( interaction < 3 ) 
  281.       longhelpseen = true ; 
  282.       {
  283.     helpptr = 4 ; 
  284.     helpline [ 3 ] = 1079 ; 
  285.     helpline [ 2 ] = 1080 ; 
  286.     helpline [ 1 ] = 1081 ; 
  287.     helpline [ 0 ] = 1082 ; 
  288.       } 
  289.     } 
  290.     error () ; 
  291.     useerrhelp = false ; 
  292.   } 
  293.   {
  294.     decr ( strptr ) ; 
  295.     poolptr = strstart [ strptr ] ; 
  296.   } 
  297. shiftcase () {
  298.     shiftcase_regmem 
  299.   halfword b  ; 
  300.   halfword p  ; 
  301.   halfword t  ; 
  302.   eightbits c  ; 
  303.   b = curchr ; 
  304.   p = scantoks ( false , false ) ; 
  305.   p = mem [ defref ] .hh .v.RH ; 
  306.   while ( p != 0 ) {
  307.       
  308.     t = mem [ p ] .hh .v.LH ; 
  309.     if ( t < 4225 ) 
  310.     {
  311.       if ( t >= 4096 ) 
  312.       t = t - 1 ; 
  313.       c = t % 256 ; 
  314.       if ( c < 128 ) 
  315.       if ( eqtb [ b + c ] .hh .v.RH != 0 ) 
  316.       t = 256 * ( t / 256 ) + eqtb [ b + c ] .hh .v.RH ; 
  317.       if ( t >= 4096 ) 
  318.       mem [ p ] .hh .v.LH = t + 1 ; 
  319.       else mem [ p ] .hh .v.LH = t ; 
  320.     } 
  321.     p = mem [ p ] .hh .v.RH ; 
  322.   } 
  323.   begintokenlist ( mem [ defref ] .hh .v.RH , 3 ) ; 
  324.   {
  325.     mem [ defref ] .hh .v.RH = avail ; 
  326.     avail = defref ; 
  327.     ;
  328. #ifdef STAT
  329.     decr ( dynused ) ; 
  330. #endif /* STAT */
  331.   } 
  332. showwhatever () {
  333.     /* 50 */ showwhatever_regmem 
  334.   halfword p  ; 
  335.   switch ( curchr ) 
  336.   {case 3 : 
  337.     {
  338.       begindiagnostic () ; 
  339.       showactivities () ; 
  340.     } 
  341.     break ; 
  342.   case 1 : 
  343.     {
  344.       scaneightbitint () ; 
  345.       begindiagnostic () ; 
  346.       printnl ( 1100 ) ; 
  347.       printint ( curval ) ; 
  348.       printchar ( 61 ) ; 
  349.       if ( eqtb [ 4322 + curval ] .hh .v.RH == 0 ) 
  350.       print ( 275 ) ; 
  351.       else showbox ( eqtb [ 4322 + curval ] .hh .v.RH ) ; 
  352.     } 
  353.     break ; 
  354.   case 0 : 
  355.     {
  356.       gettoken () ; 
  357.       if ( interaction == 3 ) 
  358.       wakeupterminal () ; 
  359.       printnl ( 1094 ) ; 
  360.       if ( curcs != 0 ) 
  361.       {
  362.     sprintcs ( curcs ) ; 
  363.     printchar ( 61 ) ; 
  364.       } 
  365.       printmeaning () ; 
  366.       goto lab50 ; 
  367.     } 
  368.     break ; 
  369.     default: 
  370.     {
  371.       p = thetoks () ; 
  372.       if ( interaction == 3 ) 
  373.       wakeupterminal () ; 
  374.       printnl ( 1094 ) ; 
  375.       tokenshow ( memtop - 3 ) ; 
  376.       flushlist ( mem [ memtop - 3 ] .hh .v.RH ) ; 
  377.       goto lab50 ; 
  378.     } 
  379.     break ; 
  380.   } 
  381.   enddiagnostic ( true ) ; 
  382.   {
  383.     if ( interaction == 3 ) 
  384.     wakeupterminal () ; 
  385.     printnl ( 133 ) ; 
  386.     print ( 1101 ) ; 
  387.   } 
  388.   if ( selector == 19 ) 
  389.   if ( eqtb [ 5296 ] .cint <= 0 ) 
  390.   {
  391.     selector = 17 ; 
  392.     print ( 1102 ) ; 
  393.     selector = 19 ; 
  394.   } 
  395.   lab50: if ( interaction < 3 ) 
  396.   {
  397.     helpptr = 0 ; 
  398.     decr ( errorcount ) ; 
  399.   } 
  400.   else if ( eqtb [ 5296 ] .cint > 0 ) 
  401.   {
  402.     {
  403.       helpptr = 3 ; 
  404.       helpline [ 2 ] = 1089 ; 
  405.       helpline [ 1 ] = 1090 ; 
  406.       helpline [ 0 ] = 1091 ; 
  407.     } 
  408.   } 
  409.   else {
  410.       
  411.     {
  412.       helpptr = 5 ; 
  413.       helpline [ 4 ] = 1089 ; 
  414.       helpline [ 3 ] = 1090 ; 
  415.       helpline [ 2 ] = 1091 ; 
  416.       helpline [ 1 ] = 1092 ; 
  417.       helpline [ 0 ] = 1093 ; 
  418.     } 
  419.   } 
  420.   error () ; 
  421. znewwhatsit ( s , w ) 
  422. smallnumber s ; 
  423. smallnumber w ; 
  424. {newwhatsit_regmem 
  425.   halfword p  ; 
  426.   p = getnode ( w ) ; 
  427.   mem [ p ] .hh.b0 = 8 ; 
  428.   mem [ p ] .hh.b1 = s ; 
  429.   mem [ curlist .tailfield ] .hh .v.RH = p ; 
  430.   curlist .tailfield = p ; 
  431. znewwritewhatsit ( w ) 
  432. smallnumber w ; 
  433. {newwritewhatsit_regmem 
  434.   newwhatsit ( curchr , w ) ; 
  435.   if ( w != 2 ) 
  436.   scanfourbitint () ; 
  437.   else {
  438.       
  439.     scanint () ; 
  440.     if ( curval < 0 ) 
  441.     curval = 17 ; 
  442.     else if ( curval > 15 ) 
  443.     curval = 16 ; 
  444.   } 
  445.   mem [ curlist .tailfield + 1 ] .hh .v.LH = curval ; 
  446. doextension () {
  447.     doextension_regmem 
  448.   integer i, j, k  ; 
  449.   halfword p, q, r  ; 
  450.   switch ( curchr ) 
  451.   {case 0 : 
  452.     {
  453.       newwritewhatsit ( 3 ) ; 
  454.       scanoptionalequals () ; 
  455.       scanfilename () ; 
  456.       mem [ curlist .tailfield + 1 ] .hh .v.RH = curname ; 
  457.       mem [ curlist .tailfield + 2 ] .hh .v.LH = curarea ; 
  458.       mem [ curlist .tailfield + 2 ] .hh .v.RH = curext ; 
  459.     } 
  460.     break ; 
  461.   case 1 : 
  462.     {
  463.       k = curcs ; 
  464.       newwritewhatsit ( 2 ) ; 
  465.       curcs = k ; 
  466.       p = scantoks ( false , false ) ; 
  467.       mem [ curlist .tailfield + 1 ] .hh .v.RH = defref ; 
  468.     } 
  469.     break ; 
  470.   case 2 : 
  471.     {
  472.       newwritewhatsit ( 2 ) ; 
  473.       mem [ curlist .tailfield + 1 ] .hh .v.RH = 0 ; 
  474.     } 
  475.     break ; 
  476.   case 3 : 
  477.     {
  478.       newwhatsit ( 3 , 2 ) ; 
  479.       mem [ curlist .tailfield + 1 ] .hh .v.LH = 0 ; 
  480.       p = scantoks ( false , true ) ; 
  481.       mem [ curlist .tailfield + 1 ] .hh .v.RH = defref ; 
  482.     } 
  483.     break ; 
  484.   case 4 : 
  485.     {
  486.       getxtoken () ; 
  487.       if ( ( curcmd == 59 ) && ( curchr <= 2 ) ) 
  488.       {
  489.     p = curlist .tailfield ; 
  490.     doextension () ; 
  491.     outwhat ( curlist .tailfield ) ; 
  492.     flushnodelist ( curlist .tailfield ) ; 
  493.     curlist .tailfield = p ; 
  494.     mem [ p ] .hh .v.RH = 0 ; 
  495.       } 
  496.       else backinput () ; 
  497.     } 
  498.     break ; 
  499.     default: 
  500.     confusion ( 1134 ) ; 
  501.     break ; 
  502.   } 
  503. handlerightbrace () {
  504.     handlerightbrace_regmem 
  505.   halfword p, q  ; 
  506.   scaled d  ; 
  507.   integer f  ; 
  508.   switch ( curgroup ) 
  509.   {case 1 : 
  510.     unsave () ; 
  511.     break ; 
  512.   case 0 : 
  513.     {
  514.       {
  515.     if ( interaction == 3 ) 
  516.     wakeupterminal () ; 
  517.     printnl ( 133 ) ; 
  518.     print ( 892 ) ; 
  519.       } 
  520.       {
  521.     helpptr = 2 ; 
  522.     helpline [ 1 ] = 893 ; 
  523.     helpline [ 0 ] = 894 ; 
  524.       } 
  525.       error () ; 
  526.     } 
  527.     break ; 
  528.   case 14 : 
  529.   case 15 : 
  530.   case 16 : 
  531.     extrarightbrace () ; 
  532.     break ; 
  533.   case 2 : 
  534.     package ( 0 ) ; 
  535.     break ; 
  536.   case 3 : 
  537.     {
  538.       adjusttail = memtop - 5 ; 
  539.       package ( 0 ) ; 
  540.     } 
  541.     break ; 
  542.   case 4 : 
  543.     {
  544.       endgraf () ; 
  545.       package ( 0 ) ; 
  546.     } 
  547.     break ; 
  548.   case 5 : 
  549.     {
  550.       endgraf () ; 
  551.       package ( 4 ) ; 
  552.     } 
  553.     break ; 
  554.   case 11 : 
  555.     {
  556.       endgraf () ; 
  557.       q = eqtb [ 3536 ] .hh .v.RH ; 
  558.       incr ( mem [ q ] .hh .v.RH ) ; 
  559.       d = eqtb [ 5707 ] .cint ; 
  560.       f = eqtb [ 5309 ] .cint ; 
  561.       unsave () ; 
  562.       decr ( saveptr ) ; 
  563.       p = vpackage ( mem [ curlist .headfield ] .hh .v.RH , 0 , 1 , 
  564.       1073741823L ) ; 
  565.       popnest () ; 
  566.       if ( savestack [ saveptr + 0 ] .cint < 255 ) 
  567.       {
  568.     {
  569.       mem [ curlist .tailfield ] .hh .v.RH = getnode ( 5 ) ; 
  570.       curlist .tailfield = mem [ curlist .tailfield ] .hh .v.RH ; 
  571.     } 
  572.     mem [ curlist .tailfield ] .hh.b0 = 3 ; 
  573.     mem [ curlist .tailfield ] .hh.b1 = savestack [ saveptr + 0 ] .cint ; 
  574.     mem [ curlist .tailfield + 3 ] .cint = mem [ p + 3 ] .cint + mem [ p + 
  575.     2 ] .cint ; 
  576.     mem [ curlist .tailfield + 4 ] .hh .v.LH = mem [ p + 5 ] .hh .v.RH ; 
  577.     mem [ curlist .tailfield + 4 ] .hh .v.RH = q ; 
  578.     mem [ curlist .tailfield + 2 ] .cint = d ; 
  579.     mem [ curlist .tailfield + 1 ] .cint = f ; 
  580.       } 
  581.       else {
  582.       
  583.     {
  584.       mem [ curlist .tailfield ] .hh .v.RH = getnode ( 2 ) ; 
  585.       curlist .tailfield = mem [ curlist .tailfield ] .hh .v.RH ; 
  586.     } 
  587.     mem [ curlist .tailfield ] .hh.b0 = 5 ; 
  588.     mem [ curlist .tailfield ] .hh.b1 = 0 ; 
  589.     mem [ curlist .tailfield + 1 ] .cint = mem [ p + 5 ] .hh .v.RH ; 
  590.     deleteglueref ( q ) ; 
  591.       } 
  592.       freenode ( p , 7 ) ; 
  593.       if ( nestptr == 0 ) 
  594.       buildpage () ; 
  595.     } 
  596.     break ; 
  597.   case 8 : 
  598.     {
  599.       if ( curinput .locfield != 0 ) 
  600.       {
  601.     {
  602.       if ( interaction == 3 ) 
  603.       wakeupterminal () ; 
  604.       printnl ( 133 ) ; 
  605.       print ( 858 ) ; 
  606.     } 
  607.     {
  608.       helpptr = 2 ; 
  609.       helpline [ 1 ] = 859 ; 
  610.       helpline [ 0 ] = 860 ; 
  611.     } 
  612.     error () ; 
  613.     do {
  614.         gettoken () ; 
  615.     } while ( ! ( curinput .locfield == 0 ) ) ; 
  616.       } 
  617.       endtokenlist () ; 
  618.       endgraf () ; 
  619.       unsave () ; 
  620.       outputactive = false ; 
  621.       insertpenalties = 0 ; 
  622.       if ( eqtb [ 4577 ] .hh .v.RH != 0 ) 
  623.       {
  624.     {
  625.       if ( interaction == 3 ) 
  626.       wakeupterminal () ; 
  627.       printnl ( 133 ) ; 
  628.       print ( 861 ) ; 
  629.     } 
  630.     printesc ( 274 ) ; 
  631.     printint ( 255 ) ; 
  632.     {
  633.       helpptr = 3 ; 
  634.       helpline [ 2 ] = 862 ; 
  635.       helpline [ 1 ] = 863 ; 
  636.       helpline [ 0 ] = 864 ; 
  637.     } 
  638.     boxerror ( 255 ) ; 
  639.       } 
  640.       if ( curlist .tailfield != curlist .headfield ) 
  641.       {
  642.     mem [ pagetail ] .hh .v.RH = mem [ curlist .headfield ] .hh .v.RH ; 
  643.     pagetail = curlist .tailfield ; 
  644.       } 
  645.       if ( mem [ memtop - 2 ] .hh .v.RH != 0 ) 
  646.       {
  647.     if ( mem [ memtop - 1 ] .hh .v.RH == 0 ) 
  648.     nest [ 0 ] .tailfield = pagetail ; 
  649.     mem [ pagetail ] .hh .v.RH = mem [ memtop - 1 ] .hh .v.RH ; 
  650.     mem [ memtop - 1 ] .hh .v.RH = mem [ memtop - 2 ] .hh .v.RH ; 
  651.     mem [ memtop - 2 ] .hh .v.RH = 0 ; 
  652.     pagetail = memtop - 2 ; 
  653.       } 
  654.       popnest () ; 
  655.       buildpage () ; 
  656.     } 
  657.     break ; 
  658.   case 10 : 
  659.     builddiscretionary () ; 
  660.     break ; 
  661.   case 6 : 
  662.     {
  663.       backinput () ; 
  664.       curtok = 7355 ; 
  665.       {
  666.     if ( interaction == 3 ) 
  667.     wakeupterminal () ; 
  668.     printnl ( 133 ) ; 
  669.     print ( 483 ) ; 
  670.       } 
  671.       printesc ( 752 ) ; 
  672.       print ( 484 ) ; 
  673.       {
  674.     helpptr = 1 ; 
  675.     helpline [ 0 ] = 973 ; 
  676.       } 
  677.       inserror () ; 
  678.     } 
  679.     break ; 
  680.   case 7 : 
  681.     {
  682.       endgraf () ; 
  683.       unsave () ; 
  684.       alignpeek () ; 
  685.     } 
  686.     break ; 
  687.   case 12 : 
  688.     {
  689.       endgraf () ; 
  690.       unsave () ; 
  691.       saveptr = saveptr - 2 ; 
  692.       p = vpackage ( mem [ curlist .headfield ] .hh .v.RH , savestack [ 
  693.       saveptr + 1 ] .cint , savestack [ saveptr + 0 ] .cint , 1073741823L ) ; 
  694.       popnest () ; 
  695.       {
  696.     mem [ curlist .tailfield ] .hh .v.RH = newnoad () ; 
  697.     curlist .tailfield = mem [ curlist .tailfield ] .hh .v.RH ; 
  698.       } 
  699.       mem [ curlist .tailfield ] .hh.b0 = 29 ; 
  700.       mem [ curlist .tailfield + 1 ] .hh .v.RH = 2 ; 
  701.       mem [ curlist .tailfield + 1 ] .hh .v.LH = p ; 
  702.     } 
  703.     break ; 
  704.   case 13 : 
  705.     buildchoices () ; 
  706.     break ; 
  707.   case 9 : 
  708.     {
  709.       unsave () ; 
  710.       decr ( saveptr ) ; 
  711.       mem [ savestack [ saveptr + 0 ] .cint ] .hh .v.RH = 3 ; 
  712.       p = finmlist ( 0 ) ; 
  713.       mem [ savestack [ saveptr + 0 ] .cint ] .hh .v.LH = p ; 
  714.       if ( p != 0 ) 
  715.       if ( mem [ p ] .hh .v.RH == 0 ) 
  716.       if ( mem [ p ] .hh.b0 == 16 ) 
  717.       {
  718.     if ( mem [ p + 3 ] .hh .v.RH == 0 ) 
  719.     if ( mem [ p + 2 ] .hh .v.RH == 0 ) 
  720.     {
  721.       mem [ savestack [ saveptr + 0 ] .cint ] .hh = mem [ p + 1 ] .hh ; 
  722.       freenode ( p , 4 ) ; 
  723.     } 
  724.       } 
  725.       else if ( mem [ p ] .hh.b0 == 28 ) 
  726.       if ( savestack [ saveptr + 0 ] .cint == curlist .tailfield + 1 ) 
  727.       if ( mem [ curlist .tailfield ] .hh.b0 == 16 ) 
  728.       {
  729.     q = curlist .headfield ; 
  730.     while ( mem [ q ] .hh .v.RH != curlist .tailfield ) q = mem [ q ] .hh 
  731.     .v.RH ; 
  732.     mem [ q ] .hh .v.RH = p ; 
  733.     freenode ( curlist .tailfield , 4 ) ; 
  734.     curlist .tailfield = p ; 
  735.       } 
  736.     } 
  737.     break ; 
  738.     default: 
  739.     confusion ( 895 ) ; 
  740.     break ; 
  741.   } 
  742. maincontrol () {
  743.     /* 60 21 70 71 72 73 74 10 */ maincontrol_regmem 
  744.   integer t  ; 
  745.   quarterword l  ; 
  746.   eightbits c  ; 
  747.   internalfontnumber f  ; 
  748.   halfword r  ; 
  749.   halfword p  ; 
  750.   integer k  ; 
  751.   halfword q  ; 
  752.   fourquarters i  ; 
  753.   fourquarters j  ; 
  754.   integer s  ; 
  755.   boolean ligaturepresent  ; 
  756.   if ( eqtb [ 4063 ] .hh .v.RH != 0 ) 
  757.   begintokenlist ( eqtb [ 4063 ] .hh .v.RH , 12 ) ; 
  758.   lab60: getxtoken () ; 
  759.   lab21: if ( interrupt != 0 ) 
  760.   if ( OKtointerrupt ) 
  761.   {
  762.     backinput () ; 
  763.     {
  764.       if ( interrupt != 0 ) 
  765.       pauseforinstructions () ; 
  766.     } 
  767.     goto lab60 ; 
  768.   } 
  769.     ;
  770. #ifdef DEBUG
  771.   if ( panicking ) 
  772.   checkmem ( false ) ; 
  773. #endif /* DEBUG */
  774.   if ( eqtb [ 5303 ] .cint > 0 ) 
  775.   showcurcmdchr () ; 
  776.   switch ( abs ( curlist .modefield ) + curcmd ) 
  777.   {case 112 : 
  778.   case 113 : 
  779.   case 168 : 
  780.     goto lab70 ; 
  781.     break ; 
  782.   case 117 : 
  783.     {
  784.       scancharnum () ; 
  785.       curchr = curval ; 
  786.       goto lab70 ; 
  787.     } 
  788.     break ; 
  789.   case 111 : 
  790.     if ( curlist .auxfield == 1000 ) 
  791.     goto lab74 ; 
  792.     else appspace () ; 
  793.     break ; 
  794.   case 165 : 
  795.   case 265 : 
  796.     goto lab74 ; 
  797.     break ; 
  798.   case 1 : 
  799.   case 101 : 
  800.   case 201 : 
  801.   case 11 : 
  802.   case 211 : 
  803.     ; 
  804.     break ; 
  805.   case 40 : 
  806.   case 140 : 
  807.   case 240 : 
  808.     {
  809.       do {
  810.       getxtoken () ; 
  811.       } while ( ! ( curcmd != 10 ) ) ; 
  812.       goto lab21 ; 
  813.     } 
  814.     break ; 
  815.   case 15 : 
  816.     if ( itsallover () ) 
  817.     return ; 
  818.     break ; 
  819.   case 23 : 
  820.   case 122 : 
  821.   case 222 : 
  822.   case 70 : 
  823.   case 170 : 
  824.   case 270 : 
  825.   case 39 : 
  826.   case 45 : 
  827.   case 49 : 
  828.   case 149 : 
  829.   case 7 : 
  830.   case 107 : 
  831.   case 207 : 
  832.     reportillegalcase () ; 
  833.     break ; 
  834.   case 8 : 
  835.   case 108 : 
  836.   case 9 : 
  837.   case 109 : 
  838.   case 18 : 
  839.   case 118 : 
  840.   case 69 : 
  841.   case 169 : 
  842.   case 51 : 
  843.   case 151 : 
  844.   case 16 : 
  845.   case 116 : 
  846.   case 50 : 
  847.   case 150 : 
  848.   case 53 : 
  849.   case 153 : 
  850.   case 66 : 
  851.   case 166 : 
  852.   case 54 : 
  853.   case 154 : 
  854.   case 55 : 
  855.   case 155 : 
  856.   case 57 : 
  857.   case 157 : 
  858.   case 56 : 
  859.   case 156 : 
  860.   case 31 : 
  861.   case 131 : 
  862.   case 52 : 
  863.   case 152 : 
  864.   case 29 : 
  865.   case 129 : 
  866.   case 47 : 
  867.   case 147 : 
  868.   case 210 : 
  869.   case 214 : 
  870.   case 215 : 
  871.   case 228 : 
  872.   case 225 : 
  873.   case 234 : 
  874.   case 237 : 
  875.     insertdollarsign () ; 
  876.     break ; 
  877.   case 37 : 
  878.   case 136 : 
  879.   case 236 : 
  880.     {
  881.       {
  882.     mem [ curlist .tailfield ] .hh .v.RH = scanrulespec () ; 
  883.     curlist .tailfield = mem [ curlist .tailfield ] .hh .v.RH ; 
  884.       } 
  885.       if ( abs ( curlist .modefield ) == 1 ) 
  886.       curlist .auxfield = -65536000L ; 
  887.       else if ( abs ( curlist .modefield ) == 101 ) 
  888.       curlist .auxfield = 1000 ; 
  889.     } 
  890.     break ; 
  891.   case 28 : 
  892.   case 127 : 
  893.   case 227 : 
  894.   case 229 : 
  895.     appendglue () ; 
  896.     break ; 
  897.   case 30 : 
  898.   case 130 : 
  899.   case 230 : 
  900.   case 231 : 
  901.     appendkern () ; 
  902.     break ; 
  903.   case 2 : 
  904.   case 102 : 
  905.     newsavelevel ( 1 ) ; 
  906.     break ; 
  907.   case 62 : 
  908.   case 162 : 
  909.   case 262 : 
  910.     newsavelevel ( 14 ) ; 
  911.     break ; 
  912.   case 63 : 
  913.   case 163 : 
  914.   case 263 : 
  915.     if ( curgroup == 14 ) 
  916.     unsave () ; 
  917.     else offsave () ; 
  918.     break ; 
  919.   case 3 : 
  920.   case 103 : 
  921.   case 203 : 
  922.     handlerightbrace () ; 
  923.     break ; 
  924.   case 22 : 
  925.   case 123 : 
  926.   case 223 : 
  927.     {
  928.       t = curchr ; 
  929.       scandimen ( false , false , false ) ; 
  930.       if ( t == 0 ) 
  931.       savestack [ saveptr + 0 ] .cint = curval ; 
  932.       else savestack [ saveptr + 0 ] .cint = - (integer) curval ; 
  933.       scanbox () ; 
  934.     } 
  935.     break ; 
  936.   case 32 : 
  937.   case 132 : 
  938.   case 232 : 
  939.     {
  940.       savestack [ saveptr + 0 ] .cint = 1073742237L + curchr ; 
  941.       scanbox () ; 
  942.     } 
  943.     break ; 
  944.   case 21 : 
  945.   case 121 : 
  946.   case 221 : 
  947.     {
  948.       savestack [ saveptr + 0 ] .cint = 0 ; 
  949.       beginbox () ; 
  950.     } 
  951.     break ; 
  952.   case 44 : 
  953.     newgraf ( curchr > 0 ) ; 
  954.     break ; 
  955.   case 12 : 
  956.   case 13 : 
  957.   case 17 : 
  958.   case 68 : 
  959.   case 4 : 
  960.   case 24 : 
  961.   case 36 : 
  962.   case 46 : 
  963.   case 48 : 
  964.   case 27 : 
  965.   case 34 : 
  966.   case 65 : 
  967.     {
  968.       backinput () ; 
  969.       newgraf ( true ) ; 
  970.     } 
  971.     break ; 
  972.   case 144 : 
  973.   case 244 : 
  974.     indentinhmode () ; 
  975.     break ; 
  976.   case 14 : 
  977.     {
  978.       normalparagraph () ; 
  979.       if ( curlist .modefield > 0 ) 
  980.       buildpage () ; 
  981.     } 
  982.     break ; 
  983.   case 114 : 
  984.     {
  985.       if ( alignstate < 0 ) 
  986.       offsave () ; 
  987.       endgraf () ; 
  988.       if ( curlist .modefield == 1 ) 
  989.       buildpage () ; 
  990.     } 
  991.     break ; 
  992.   case 115 : 
  993.   case 128 : 
  994.   case 137 : 
  995.   case 125 : 
  996.   case 133 : 
  997.     headforvmode () ; 
  998.     break ; 
  999.   case 38 : 
  1000.   case 138 : 
  1001.   case 238 : 
  1002.   case 139 : 
  1003.   case 239 : 
  1004.     begininsertoradjust () ; 
  1005.     break ; 
  1006.   case 19 : 
  1007.   case 119 : 
  1008.   case 219 : 
  1009.     makemark () ; 
  1010.     break ; 
  1011.   case 43 : 
  1012.   case 143 : 
  1013.   case 243 : 
  1014.     appendpenalty () ; 
  1015.     break ; 
  1016.   case 26 : 
  1017.   case 126 : 
  1018.   case 226 : 
  1019.     deletelast () ; 
  1020.     break ; 
  1021.   case 25 : 
  1022.   case 124 : 
  1023.   case 224 : 
  1024.     unpackage () ; 
  1025.     break ; 
  1026.   case 145 : 
  1027.     appenditaliccorrecti () ; 
  1028.     break ; 
  1029.   case 245 : 
  1030.     {
  1031.       mem [ curlist .tailfield ] .hh .v.RH = newkern ( 0 ) ; 
  1032.       curlist .tailfield = mem [ curlist .tailfield ] .hh .v.RH ; 
  1033.     } 
  1034.     break ; 
  1035.   case 148 : 
  1036.   case 248 : 
  1037.     appenddiscretionary () ; 
  1038.     break ; 
  1039.   case 146 : 
  1040.     makeaccent () ; 
  1041.     break ; 
  1042.   case 6 : 
  1043.   case 106 : 
  1044.   case 206 : 
  1045.   case 5 : 
  1046.   case 105 : 
  1047.   case 205 : 
  1048.     alignerror () ; 
  1049.     break ; 
  1050.   case 35 : 
  1051.   case 135 : 
  1052.   case 235 : 
  1053.     noalignerror () ; 
  1054.     break ; 
  1055.   case 64 : 
  1056.   case 164 : 
  1057.   case 264 : 
  1058.     omiterror () ; 
  1059.     break ; 
  1060.   case 33 : 
  1061.   case 134 : 
  1062.     initalign () ; 
  1063.     break ; 
  1064.   case 233 : 
  1065.     if ( privileged () ) 
  1066.     initalign () ; 
  1067.     break ; 
  1068.   case 10 : 
  1069.   case 110 : 
  1070.     doendv () ; 
  1071.     break ; 
  1072.   case 67 : 
  1073.   case 167 : 
  1074.   case 267 : 
  1075.     cserror () ; 
  1076.     break ; 
  1077.   case 104 : 
  1078.     initmath () ; 
  1079.     break ; 
  1080.   case 249 : 
  1081.     if ( privileged () ) 
  1082.     starteqno () ; 
  1083.     break ; 
  1084.   case 202 : 
  1085.     {
  1086.       {
  1087.     mem [ curlist .tailfield ] .hh .v.RH = newnoad () ; 
  1088.     curlist .tailfield = mem [ curlist .tailfield ] .hh .v.RH ; 
  1089.       } 
  1090.       backinput () ; 
  1091.       scanmath ( curlist .tailfield + 1 ) ; 
  1092.     } 
  1093.     break ; 
  1094.   case 212 : 
  1095.   case 213 : 
  1096.   case 268 : 
  1097.     if ( curchr < 128 ) 
  1098.     setmathchar ( eqtb [ 5139 + curchr ] .hh .v.RH ) ; 
  1099.     else setmathchar ( curchr ) ; 
  1100.     break ; 
  1101.   case 217 : 
  1102.     {
  1103.       scancharnum () ; 
  1104.       curchr = curval ; 
  1105.       if ( curchr < 128 ) 
  1106.       setmathchar ( eqtb [ 5139 + curchr ] .hh .v.RH ) ; 
  1107.       else setmathchar ( curchr ) ; 
  1108.     } 
  1109.     break ; 
  1110.   case 218 : 
  1111.     {
  1112.       scanfifteenbitint () ; 
  1113.       setmathchar ( curval ) ; 
  1114.     } 
  1115.     break ; 
  1116.   case 269 : 
  1117.     setmathchar ( curchr ) ; 
  1118.     break ; 
  1119.   case 216 : 
  1120.     {
  1121.       scantwentysevenbitin () ; 
  1122.       setmathchar ( curval / 4096 ) ; 
  1123.     } 
  1124.     break ; 
  1125.   case 251 : 
  1126.     {
  1127.       {
  1128.     mem [ curlist .tailfield ] .hh .v.RH = newnoad () ; 
  1129.     curlist .tailfield = mem [ curlist .tailfield ] .hh .v.RH ; 
  1130.       } 
  1131.       mem [ curlist .tailfield ] .hh.b0 = curchr ; 
  1132.       scanmath ( curlist .tailfield + 1 ) ; 
  1133.     } 
  1134.     break ; 
  1135.   case 252 : 
  1136.     mathlimitswitch () ; 
  1137.     break ; 
  1138.   case 266 : 
  1139.     mathradical () ; 
  1140.     break ; 
  1141.   case 246 : 
  1142.   case 247 : 
  1143.     mathac () ; 
  1144.     break ; 
  1145.   case 257 : 
  1146.     {
  1147.       scanspec () ; 
  1148.       newsavelevel ( 12 ) ; 
  1149.       normalparagraph () ; 
  1150.       pushnest () ; 
  1151.       curlist .modefield = -1 ; 
  1152.       curlist .auxfield = -65536000L ; 
  1153.       if ( eqtb [ 4062 ] .hh .v.RH != 0 ) 
  1154.       begintokenlist ( eqtb [ 4062 ] .hh .v.RH , 11 ) ; 
  1155.     } 
  1156.     break ; 
  1157.   case 254 : 
  1158.     {
  1159.       mem [ curlist .tailfield ] .hh .v.RH = newstyle ( curchr ) ; 
  1160.       curlist .tailfield = mem [ curlist .tailfield ] .hh .v.RH ; 
  1161.     } 
  1162.     break ; 
  1163.   case 256 : 
  1164.     {
  1165.       {
  1166.     mem [ curlist .tailfield ] .hh .v.RH = newglue ( 0 ) ; 
  1167.     curlist .tailfield = mem [ curlist .tailfield ] .hh .v.RH ; 
  1168.       } 
  1169.       mem [ curlist .tailfield ] .hh.b1 = 98 ; 
  1170.     } 
  1171.     break ; 
  1172.   case 255 : 
  1173.     appendchoices () ; 
  1174.     break ; 
  1175.   case 209 : 
  1176.   case 208 : 
  1177.     subsup () ; 
  1178.     break ; 
  1179.   case 253 : 
  1180.     mathfraction () ; 
  1181.     break ; 
  1182.   case 250 : 
  1183.     mathleftright () ; 
  1184.     break ; 
  1185.   case 204 : 
  1186.     if ( curgroup == 15 ) 
  1187.     aftermath () ; 
  1188.     else offsave () ; 
  1189.     break ; 
  1190.   case 71 : 
  1191.   case 171 : 
  1192.   case 271 : 
  1193.   case 72 : 
  1194.   case 172 : 
  1195.   case 272 : 
  1196.   case 73 : 
  1197.   case 173 : 
  1198.   case 273 : 
  1199.   case 74 : 
  1200.   case 174 : 
  1201.   case 274 : 
  1202.   case 75 : 
  1203.   case 175 : 
  1204.   case 275 : 
  1205.   case 76 : 
  1206.   case 176 : 
  1207.   case 276 : 
  1208.   case 77 : 
  1209.   case 177 : 
  1210.   case 277 : 
  1211.   case 78 : 
  1212.   case 178 : 
  1213.   case 278 : 
  1214.   case 79 : 
  1215.   case 179 : 
  1216.   case 279 : 
  1217.   case 80 : 
  1218.   case 180 : 
  1219.   case 280 : 
  1220.   case 81 : 
  1221.   case 181 : 
  1222.   case 281 : 
  1223.   case 82 : 
  1224.   case 182 : 
  1225.   case 282 : 
  1226.   case 83 : 
  1227.   case 183 : 
  1228.   case 283 : 
  1229.   case 84 : 
  1230.   case 184 : 
  1231.   case 284 : 
  1232.   case 85 : 
  1233.   case 185 : 
  1234.   case 285 : 
  1235.   case 86 : 
  1236.   case 186 : 
  1237.   case 286 : 
  1238.   case 87 : 
  1239.   case 187 : 
  1240.   case 287 : 
  1241.   case 88 : 
  1242.   case 188 : 
  1243.   case 288 : 
  1244.   case 89 : 
  1245.   case 189 : 
  1246.   case 289 : 
  1247.   case 90 : 
  1248.   case 190 : 
  1249.   case 290 : 
  1250.   case 91 : 
  1251.   case 191 : 
  1252.   case 291 : 
  1253.   case 92 : 
  1254.   case 192 : 
  1255.   case 292 : 
  1256.   case 93 : 
  1257.   case 193 : 
  1258.   case 293 : 
  1259.   case 94 : 
  1260.   case 194 : 
  1261.   case 294 : 
  1262.   case 95 : 
  1263.   case 195 : 
  1264.   case 295 : 
  1265.   case 96 : 
  1266.   case 196 : 
  1267.   case 296 : 
  1268.   case 97 : 
  1269.   case 197 : 
  1270.   case 297 : 
  1271.   case 98 : 
  1272.   case 198 : 
  1273.   case 298 : 
  1274.   case 99 : 
  1275.   case 199 : 
  1276.   case 299 : 
  1277.   case 100 : 
  1278.   case 200 : 
  1279.   case 300 : 
  1280.     prefixedcommand () ; 
  1281.     break ; 
  1282.   case 41 : 
  1283.   case 141 : 
  1284.   case 241 : 
  1285.     {
  1286.       gettoken () ; 
  1287.       aftertoken = curtok ; 
  1288.     } 
  1289.     break ; 
  1290.   case 42 : 
  1291.   case 142 : 
  1292.   case 242 : 
  1293.     {
  1294.       gettoken () ; 
  1295.       saveforafter ( curtok ) ; 
  1296.     } 
  1297.     break ; 
  1298.   case 61 : 
  1299.   case 161 : 
  1300.   case 261 : 
  1301.     openorclosein () ; 
  1302.     break ; 
  1303.   case 59 : 
  1304.   case 159 : 
  1305.   case 259 : 
  1306.     issuemessage () ; 
  1307.     break ; 
  1308.   case 58 : 
  1309.   case 158 : 
  1310.   case 258 : 
  1311.     shiftcase () ; 
  1312.     break ; 
  1313.   case 20 : 
  1314.   case 120 : 
  1315.   case 220 : 
  1316.     showwhatever () ; 
  1317.     break ; 
  1318.   case 60 : 
  1319.   case 160 : 
  1320.   case 260 : 
  1321.     doextension () ; 
  1322.     break ; 
  1323.   } 
  1324.   goto lab60 ; 
  1325.   lab70: f = eqtb [ 4578 ] .hh .v.RH ; 
  1326.   c = curchr ; 
  1327.   lab71: if ( ( c < fontbc [ f ] ) || ( c > fontec [ f ] ) ) 
  1328.   {
  1329.     charwarning ( f , c ) ; 
  1330.     goto lab60 ; 
  1331.   } 
  1332.   lab72: q = curlist .tailfield ; 
  1333.   ligaturepresent = false ; 
  1334.   l = c ; 
  1335.   lab73: if ( c < 128 ) 
  1336.   {
  1337.     s = eqtb [ 5011 + c ] .hh .v.RH ; 
  1338.     if ( s == 1000 ) 
  1339.     curlist .auxfield = 1000 ; 
  1340.     else if ( s < 1000 ) 
  1341.     {
  1342.       if ( s > 0 ) 
  1343.       curlist .auxfield = s ; 
  1344.     } 
  1345.     else if ( curlist .auxfield < 1000 ) 
  1346.     curlist .auxfield = 1000 ; 
  1347.     else curlist .auxfield = s ; 
  1348.   } 
  1349.   else curlist .auxfield = 1000 ; 
  1350.   i = fontinfo [ charbase [ f ] + l ] .qqqq ; 
  1351.   if ( ( i .b0 > 0 ) ) 
  1352.   {
  1353.     {
  1354.       p = avail ; 
  1355.       if ( p == 0 ) 
  1356.       p = getavail () ; 
  1357.       else {
  1358.       
  1359.     avail = mem [ p ] .hh .v.RH ; 
  1360.     mem [ p ] .hh .v.RH = 0 ; 
  1361.     ;
  1362. #ifdef STAT
  1363.     incr ( dynused ) ; 
  1364. #endif /* STAT */
  1365.       } 
  1366.     } 
  1367.     mem [ p ] .hh.b0 = f ; 
  1368.     mem [ p ] .hh.b1 = c ; 
  1369.     mem [ curlist .tailfield ] .hh .v.RH = p ; 
  1370.     curlist .tailfield = p ; 
  1371.   } 
  1372.   else charwarning ( f , l ) ; 
  1373.   getnext () ; 
  1374.   if ( curcmd == 11 ) 
  1375.   r = curchr ; 
  1376.   else if ( curcmd == 12 ) 
  1377.   r = curchr ; 
  1378.   else if ( curcmd == 67 ) 
  1379.   r = curchr ; 
  1380.   else {
  1381.       
  1382.     xtoken () ; 
  1383.     if ( ( curcmd == 11 ) || ( curcmd == 12 ) || ( curcmd == 67 ) ) 
  1384.     r = curchr ; 
  1385.     else if ( curcmd == 16 ) 
  1386.     {
  1387.       scancharnum () ; 
  1388.       r = curval ; 
  1389.     } 
  1390.     else r = 256 ; 
  1391.   } 
  1392.   if ( ( ( i .b2 ) % 4 ) == 1 ) 
  1393.   if ( r != 256 ) 
  1394.   {
  1395.     k = ligkernbase [ f ] + i .b3 ; 
  1396.     do {
  1397.     j = fontinfo [ k ] .qqqq ; 
  1398.       if ( j .b1 == r ) 
  1399.       if ( j .b2 < 128 ) 
  1400.       {
  1401.     ligaturepresent = true ; 
  1402.     l = j .b3 ; 
  1403.     c = r ; 
  1404.     goto lab73 ; 
  1405.       } 
  1406.       else {
  1407.       
  1408.     if ( ligaturepresent ) 
  1409.     {
  1410.       p = newligature ( f , l , mem [ q ] .hh .v.RH ) ; 
  1411.       mem [ q ] .hh .v.RH = p ; 
  1412.       curlist .tailfield = p ; 
  1413.     } 
  1414.     if ( c == hyphenchar [ f ] ) 
  1415.     if ( curlist .modefield == 101 ) 
  1416.     {
  1417.       mem [ curlist .tailfield ] .hh .v.RH = newdisc () ; 
  1418.       curlist .tailfield = mem [ curlist .tailfield ] .hh .v.RH ; 
  1419.     } 
  1420.     {
  1421.       mem [ curlist .tailfield ] .hh .v.RH = newkern ( fontinfo [ kernbase 
  1422.       [ f ] + j .b3 ] .cint ) ; 
  1423.       curlist .tailfield = mem [ curlist .tailfield ] .hh .v.RH ; 
  1424.     } 
  1425.     c = r ; 
  1426.     goto lab72 ; 
  1427.       } 
  1428.       incr ( k ) ; 
  1429.     } while ( ! ( j .b0 >= 128 ) ) ; 
  1430.   } 
  1431.   if ( ligaturepresent ) 
  1432.   {
  1433.     p = newligature ( f , l , mem [ q ] .hh .v.RH ) ; 
  1434.     mem [ q ] .hh .v.RH = p ; 
  1435.     curlist .tailfield = p ; 
  1436.   } 
  1437.   if ( c == hyphenchar [ f ] ) 
  1438.   if ( curlist .modefield == 101 ) 
  1439.   {
  1440.     mem [ curlist .tailfield ] .hh .v.RH = newdisc () ; 
  1441.     curlist .tailfield = mem [ curlist .tailfield ] .hh .v.RH ; 
  1442.   } 
  1443.   if ( r == 256 ) 
  1444.   goto lab21 ; 
  1445.   c = r ; 
  1446.   goto lab71 ; 
  1447.   lab74: if ( eqtb [ 3538 ] .hh .v.RH == 0 ) 
  1448.   {
  1449.     {
  1450.       p = fontglue [ eqtb [ 4578 ] .hh .v.RH ] ; 
  1451.       if ( p == 0 ) 
  1452.       {
  1453.     f = eqtb [ 4578 ] .hh .v.RH ; 
  1454.     p = newspec ( 0 ) ; 
  1455.     k = parambase [ f ] + 2 ; 
  1456.     mem [ p + 1 ] .cint = fontinfo [ k ] .cint ; 
  1457.     mem [ p + 2 ] .cint = fontinfo [ k + 1 ] .cint ; 
  1458.     mem [ p + 3 ] .cint = fontinfo [ k + 2 ] .cint ; 
  1459.     fontglue [ f ] = p ; 
  1460.       } 
  1461.     } 
  1462.     q = newglue ( p ) ; 
  1463.   } 
  1464.   else q = newparamglue ( 12 ) ; 
  1465.   mem [ curlist .tailfield ] .hh .v.RH = q ; 
  1466.   curlist .tailfield = q ; 
  1467.   goto lab60 ; 
  1468. giveerrhelp () {
  1469.     giveerrhelp_regmem 
  1470.   tokenshow ( eqtb [ 4065 ] .hh .v.RH ) ; 
  1471. boolean openfmtfile () {
  1472.     /* 40 10 */ register boolean Result; 
  1473.   openfmtfile_regmem 
  1474.   integer j  ; 
  1475.   j = curinput .locfield ; 
  1476.   if ( buffer [ curinput .locfield ] == 38 ) 
  1477.   {
  1478.     incr ( curinput .locfield ) ; 
  1479.     j = curinput .locfield ; 
  1480.     buffer [ last ] = 32 ; 
  1481.     while ( buffer [ j ] != 32 ) incr ( j ) ; 
  1482.     packbufferedname ( 0 , curinput .locfield , j - 1 ) ; 
  1483.     if ( wopenin ( fmtfile ) ) 
  1484.     goto lab40 ; 
  1485.     wakeupterminal () ; 
  1486. #ifdef RISC_OS
  1487.     (void) Fputs( stdout , "Sorry, I can't find that format; will try PLAIN."); 
  1488. #else
  1489.     (void) fprintf( stdout , "%s%s\n",  "Sorry, I can't find that format;" , " will try PLAIN."     ) ; 
  1490. #endif
  1491.     termflush ( stdout ) ; 
  1492.   } 
  1493.   packbufferedname ( 5 , 1 , 0 ) ; 
  1494.   if ( ! wopenin ( fmtfile ) ) 
  1495.   {
  1496.     wakeupterminal () ; 
  1497. #ifdef RISC_OS
  1498.     (void) Fputs( stdout , "I can't find the PLAIN format file!" ) ;
  1499. #else
  1500.     (void) fprintf( stdout , "%s\n",  "I can't find the PLAIN format file!" ) ;
  1501. #endif 
  1502.     Result = false ; 
  1503.     return(Result) ; 
  1504.   } 
  1505.   lab40: curinput .locfield = j ; 
  1506.   Result = true ; 
  1507.   return(Result) ; 
  1508. boolean loadfmtfile () {
  1509.     /* 6666 10 */ register boolean Result; 
  1510.   loadfmtfile_regmem 
  1511.   integer j, k  ; 
  1512.   halfword p, q  ; 
  1513.   integer x  ; 
  1514.   getfmtint ( x ) ; 
  1515.   if ( x != 67218746L ) 
  1516.   goto lab6666 ; 
  1517.   getfmtint ( x ) ; 
  1518.   if ( x != 0 ) 
  1519.   goto lab6666 ; 
  1520.   getfmtint ( x ) ; 
  1521.   if ( x != memtop ) 
  1522.   goto lab6666 ; 
  1523.   getfmtint ( x ) ; 
  1524.   if ( x != 5976 ) 
  1525.   goto lab6666 ; 
  1526.   getfmtint ( x ) ; 
  1527.   if ( x != 2551 ) 
  1528.   goto lab6666 ; 
  1529.   getfmtint ( x ) ; 
  1530.   if ( x != 307 ) 
  1531.   goto lab6666 ; 
  1532.   {
  1533.     getfmtint ( x ) ; 
  1534.     if ( x < 0 ) 
  1535.     goto lab6666 ; 
  1536.     if ( x > poolsize ) 
  1537.     {
  1538.       wakeupterminal () ; 
  1539. #ifdef RISC_OS
  1540.       (void) Fputs( stdout , "---! Must increase the string pool size" ) ; 
  1541. #else
  1542.       (void) fprintf( stdout , "%s%s\n",  "---! Must increase the " , "string pool size" ) ; 
  1543. #endif
  1544.       goto lab6666 ; 
  1545.     } 
  1546.     else poolptr = x ; 
  1547.   } 
  1548.   {
  1549.     getfmtint ( x ) ; 
  1550.     if ( x < 0 ) 
  1551.     goto lab6666 ; 
  1552.     if ( x > maxstrings ) 
  1553.     {
  1554.       wakeupterminal () ; 
  1555. #ifdef RISC_OS
  1556.       (void) Fputs( stdout , "---! Must increase the max strings" ) ; 
  1557. #else
  1558.       (void) fprintf( stdout , "%s%s\n",  "---! Must increase the " , "max strings" ) ; 
  1559. #endif
  1560.       goto lab6666 ; 
  1561.     } 
  1562.     else strptr = x ; 
  1563.   } 
  1564.   undumpthings ( strstart [ 0 ] , strptr + 1 ) ; 
  1565.   undumpthings ( strpool [ 0 ] , poolptr ) ; 
  1566.   {
  1567.     getfmtint ( x ) ; 
  1568.     if ( ( x < 1019 ) || ( x > memtop - 14 ) ) 
  1569.     goto lab6666 ; 
  1570.     else lomemmax = x ; 
  1571.   } 
  1572.   {
  1573.     getfmtint ( x ) ; 
  1574.     if ( ( x < 20 ) || ( x > lomemmax ) ) 
  1575.     goto lab6666 ; 
  1576.     else rover = x ; 
  1577.   } 
  1578.   p = 0 ; 
  1579.   q = rover ; 
  1580.   x = 0 ; 
  1581.   do {
  1582.       undumpthings ( mem [ p ] , q + 2 - p ) ; 
  1583.     p = q + mem [ q ] .hh .v.LH ; 
  1584.     if ( ( p > lomemmax ) || ( ( q >= mem [ q + 1 ] .hh .v.RH ) && ( mem [ q + 
  1585.     1 ] .hh .v.RH != rover ) ) ) 
  1586.     goto lab6666 ; 
  1587.     q = mem [ q + 1 ] .hh .v.RH ; 
  1588.   } while ( ! ( q == rover ) ) ; 
  1589.   undumpthings ( mem [ p ] , lomemmax + 1 - p ) ; 
  1590.   if ( memmin < -2 ) 
  1591.   {
  1592.     p = mem [ rover + 1 ] .hh .v.LH ; 
  1593.     q = memmin + 1 ; 
  1594.     mem [ memmin ] .hh .v.RH = 0 ; 
  1595.     mem [ memmin ] .hh .v.LH = 0 ; 
  1596.     mem [ p + 1 ] .hh .v.RH = q ; 
  1597.     mem [ rover + 1 ] .hh .v.LH = q ; 
  1598.     mem [ q + 1 ] .hh .v.RH = rover ; 
  1599.     mem [ q + 1 ] .hh .v.LH = p ; 
  1600.     mem [ q ] .hh .v.RH = 65535L ; 
  1601.     mem [ q ] .hh .v.LH = -0 - q ; 
  1602.   } 
  1603.   {
  1604.     getfmtint ( x ) ; 
  1605.     if ( ( x < lomemmax + 1 ) || ( x > memtop - 13 ) ) 
  1606.     goto lab6666 ; 
  1607.     else himemmin = x ; 
  1608.   } 
  1609.   {
  1610.     getfmtint ( x ) ; 
  1611.     if ( ( x < 0 ) || ( x > memtop ) ) 
  1612.     goto lab6666 ; 
  1613.     else avail = x ; 
  1614.   } 
  1615.   memend = memtop ; 
  1616.   undumpthings ( mem [ himemmin ] , memend + 1 - himemmin ) ; 
  1617.   getfmtint ( varused ) ; 
  1618.   getfmtint ( dynused ) ; 
  1619.   k = 1 ; 
  1620.   do {
  1621.       getfmtint ( x ) ; 
  1622.     if ( ( x < 1 ) || ( k + x > 5977 ) ) 
  1623.     goto lab6666 ; 
  1624.     undumpthings ( eqtb [ k ] , x ) ; 
  1625.     k = k + x ; 
  1626.     getfmtint ( x ) ; 
  1627.     if ( ( x < 0 ) || ( k + x > 5977 ) ) 
  1628.     goto lab6666 ; 
  1629.     {register integer for_end; j = k ; for_end = k + x - 1 ; if ( j <= 
  1630.     for_end) do 
  1631.       eqtb [ j ] = eqtb [ k - 1 ] ; 
  1632.     while ( j++ < for_end ) ; } 
  1633.     k = k + x ; 
  1634.   } while ( ! ( k > 5976 ) ) ; 
  1635.   {
  1636.     getfmtint ( x ) ; 
  1637.     if ( ( x < 258 ) || ( x > 3258 ) ) 
  1638.     goto lab6666 ; 
  1639.     else parloc = x ; 
  1640.   } 
  1641.   partoken = 4096 + parloc ; 
  1642.   {
  1643.     getfmtint ( x ) ; 
  1644.     if ( ( x < 258 ) || ( x > 3258 ) ) 
  1645.     goto lab6666 ; 
  1646.     else
  1647.     writeloc = x ; 
  1648.   } 
  1649.   {
  1650.     getfmtint ( x ) ; 
  1651.     if ( ( x < 258 ) || ( x > 3258 ) ) 
  1652.     goto lab6666 ; 
  1653.     else hashused = x ; 
  1654.   } 
  1655.   p = 257 ; 
  1656.   do {
  1657.       { 
  1658.       getfmtint ( x ) ; 
  1659.       if ( ( x < p + 1 ) || ( x > hashused ) ) 
  1660.       goto lab6666 ; 
  1661.       else p = x ; 
  1662.     } 
  1663.     getfmthh ( hash [ p ] ) ; 
  1664.   } while ( ! ( p == hashused ) ) ; 
  1665.   undumpthings ( hash [ hashused + 1 ] , 3524 - hashused ) ; 
  1666.   getfmtint ( cscount ) ; 
  1667.   {
  1668.     getfmtint ( x ) ; 
  1669.     if ( x < 7 ) 
  1670.     goto lab6666 ; 
  1671.     if ( x > fontmemsize ) 
  1672.     {
  1673.       wakeupterminal () ; 
  1674. #ifdef RISC_OS
  1675.       (void) Fputs( stdout , "---! Must increase the font mem size" ) ; 
  1676. #else
  1677.       (void) fprintf( stdout , "%s%s\n",  "---! Must increase the " , "font mem size" ) ; 
  1678. #endif
  1679.       goto lab6666 ; 
  1680.     } 
  1681.     else fmemptr = x ; 
  1682.   } 
  1683.   {
  1684.     undumpthings ( fontinfo [ 0 ] , fmemptr ) ; 
  1685.     {
  1686.       getfmtint ( x ) ; 
  1687.       if ( x < 0 ) 
  1688.       goto lab6666 ; 
  1689.       if ( x > fontmax ) 
  1690.       {
  1691.     wakeupterminal () ; 
  1692. #ifdef RISC_OS
  1693.     (void) Fputs( stdout , "---! Must increase the font max" ) ;
  1694. #else
  1695.     (void) fprintf( stdout , "%s%s\n",  "---! Must increase the " , "font max" ) ;
  1696. #endif 
  1697.     goto lab6666 ; 
  1698.       } 
  1699.       else fontptr = x ; 
  1700.     } 
  1701.     undumpthings ( fontcheck [ 0 ] , fontptr + 1 ) ; 
  1702.     undumpthings ( fontsize [ 0 ] , fontptr + 1 ) ; 
  1703.     undumpthings ( fontdsize [ 0 ] , fontptr + 1 ) ; 
  1704.     undumpthings ( fontparams [ 0 ] , fontptr + 1 ) ; 
  1705.     undumpthings ( hyphenchar [ 0 ] , fontptr + 1 ) ; 
  1706.     undumpthings ( skewchar [ 0 ] , fontptr + 1 ) ; 
  1707.     undumpthings ( fontname [ 0 ] , fontptr + 1 ) ; 
  1708.     undumpthings ( fontarea [ 0 ] , fontptr + 1 ) ; 
  1709.     undumpthings ( fontbc [ 0 ] , fontptr + 1 ) ; 
  1710.     undumpthings ( fontec [ 0 ] , fontptr + 1 ) ; 
  1711.     undumpthings ( charbase [ 0 ] , fontptr + 1 ) ; 
  1712.     undumpthings ( widthbase [ 0 ] , fontptr + 1 ) ; 
  1713.     undumpthings ( heightbase [ 0 ] , fontptr + 1 ) ; 
  1714.     undumpthings ( depthbase [ 0 ] , fontptr + 1 ) ; 
  1715.     undumpthings ( italicbase [ 0 ] , fontptr + 1 ) ; 
  1716.     undumpthings ( ligkernbase [ 0 ] , fontptr + 1 ) ; 
  1717.     undumpthings ( kernbase [ 0 ] , fontptr + 1 ) ; 
  1718.     undumpthings ( extenbase [ 0 ] , fontptr + 1 ) ; 
  1719.     undumpthings ( parambase [ 0 ] , fontptr + 1 ) ; 
  1720.     undumpthings ( fontglue [ 0 ] , fontptr + 1 ) ; 
  1721.   } 
  1722.   {
  1723.     getfmtint ( x ) ; 
  1724.     if ( ( x < 0 ) || ( x > 307 ) ) 
  1725.     goto lab6666 ; 
  1726.     else hyphcount = x ; 
  1727.   } 
  1728.   {register integer for_end; k = 1 ; for_end = hyphcount ; if ( k <= for_end) 
  1729.   do 
  1730.     {
  1731.       {
  1732.     getfmtint ( x ) ; 
  1733.     if ( ( x < 0 ) || ( x > 307 ) ) 
  1734.     goto lab6666 ; 
  1735.     else j = x ; 
  1736.       } 
  1737.       {
  1738.     getfmtint ( x ) ; 
  1739.     if ( ( x < 0 ) || ( x > strptr ) ) 
  1740.     goto lab6666 ; 
  1741.     else hyphword [ j ] = x ; 
  1742.       } 
  1743.       {
  1744.     getfmtint ( x ) ; 
  1745.     if ( ( x < 0 ) || ( x > 65535L ) ) 
  1746.     goto lab6666 ; 
  1747.     else hyphlist [ j ] = x ; 
  1748.       } 
  1749.     } 
  1750.   while ( k++ < for_end ) ; } 
  1751.   {
  1752.     getfmtint ( x ) ; 
  1753.     if ( x < 0 ) 
  1754.     goto lab6666 ; 
  1755.     if ( x > triesize ) 
  1756.     {
  1757.       wakeupterminal () ; 
  1758. #ifdef RISC_OS
  1759.       (void) Fputs( stdout , "---! Must increase the trie size" ) ; 
  1760. #else
  1761.       (void) fprintf( stdout , "%s%s\n",  "---! Must increase the " , "trie size" ) ; 
  1762. #endif
  1763.       goto lab6666 ; 
  1764.     } 
  1765.     else triemax = x ; 
  1766.   } 
  1767.   undumpthings ( trie [ 0 ] , triemax + 1 ) ; 
  1768.   {
  1769.     getfmtint ( x ) ; 
  1770.     if ( ( x < 0 ) || ( x > 255 ) ) 
  1771.     goto lab6666 ; 
  1772.     else trieopptr = x ; 
  1773.   } 
  1774.   undumpthings ( hyfdistance [ 1 ] , trieopptr - 0 ) ; 
  1775.   undumpthings ( hyfnum [ 1 ] , trieopptr - 0 ) ; 
  1776.   undumpthings ( hyfnext [ 1 ] , trieopptr - 0 ) ; 
  1777.   {
  1778.     getfmtint ( x ) ; 
  1779.     if ( ( x < 0 ) || ( x > 3 ) ) 
  1780.     goto lab6666 ; 
  1781.     else interaction = x ; 
  1782.   } 
  1783.   {
  1784.     getfmtint ( x ) ; 
  1785.     if ( ( x < 0 ) || ( x > strptr ) ) 
  1786.     goto lab6666 ; 
  1787.     else formatident = x ; 
  1788.   } 
  1789.   getfmtint ( x ) ; 
  1790.   if ( ( x != 69069L ) || eof ( fmtfile ) ) 
  1791.   goto lab6666 ; 
  1792.   Result = true ; 
  1793.   return(Result) ; 
  1794.   lab6666: wakeupterminal () ; 
  1795. #ifdef RISC_OS
  1796.   (void) Fputs( stdout , "(Fatal format file error; I'm stymied)" );
  1797. #else
  1798.   (void) fprintf( stdout , "%s\n",  "(Fatal format file error; I'm stymied)" );
  1799. #endif 
  1800.   Result = false ; 
  1801.   return(Result) ; 
  1802. closefilesandtermina () {
  1803.     closefilesandtermina_regmem 
  1804.   integer k  ; 
  1805.   {register integer for_end; k = 0 ; for_end = 15 ; if ( k <= for_end) do 
  1806.     if ( writeopen [ k ] ) 
  1807.     aclose ( writefile [ k ] ) ; 
  1808.   while ( k++ < for_end ) ; } 
  1809.     ;
  1810. #ifdef STAT
  1811.   if ( eqtb [ 5298 ] .cint > 0 ) 
  1812.   if ( jobname > 0 ) 
  1813.   {
  1814.     (void) fprintf( logfile , "%c\n",  ' ' ) ; 
  1815.     (void) fprintf( logfile , "%s%s\n",  "Here is how much of TeX's memory" , " you used:" ) ; 
  1816.     (void) fprintf( logfile , "%c%ld%s",  ' ' , (long)strptr - initstrptr , " string" ) ; 
  1817.     if ( strptr != initstrptr + 1 ) 
  1818.     (void) putc( 's' ,  logfile );
  1819.     (void) fprintf( logfile , "%s%ld\n",  " out of " , (long)maxstrings - initstrptr ) ; 
  1820.     (void) fprintf( logfile , "%c%ld%s%ld\n",  ' ' , (long)poolptr - initpoolptr ,     " string characters out of " , (long)poolsize - initpoolptr ) ; 
  1821.     (void) fprintf( logfile , "%c%ld%s%ld\n",  ' ' , (long)lomemmax - memmin + memend - himemmin + 2 ,     " words of memory out of " , (long)memend + 1 - memmin ) ; 
  1822.     (void) fprintf( logfile , "%c%ld%s%ld\n",  ' ' , (long)cscount ,     " multiletter control sequences out of " , (long)3000 ) ; 
  1823.     (void) fprintf( logfile , "%c%ld%s%ld%s",  ' ' , (long)fmemptr , " words of font info for " , (long)fontptr - 0     , " font" ) ; 
  1824.     if ( fontptr != 1 ) 
  1825.     (void) putc( 's' ,  logfile );
  1826.     (void) fprintf( logfile , "%s%ld%s%ld\n",  ", out of " , (long)fontmemsize , " for " , (long)fontmax - 0 ) ; 
  1827.     (void) fprintf( logfile , "%c%ld%s",  ' ' , (long)hyphcount , " hyphenation exception" ) ; 
  1828.     if ( hyphcount != 1 ) 
  1829.     (void) putc( 's' ,  logfile );
  1830.     (void) fprintf( logfile , "%s%ld\n",  " out of " , (long)307 ) ; 
  1831.     (void) fprintf( logfile , "%c%ld%s%ld%s%ld%s%ld%s%ld%s%ld%s%ld%s%ld%s%ld%s%ld%c\n",  ' ' , (long)maxinstack , "i," , (long)maxneststack , "n," ,     (long)maxparamstack , "p," , (long)maxbufstack + 1 , "b," , (long)maxsavestack + 6 ,     "s stack positions out of " , (long)stacksize , "i," , (long)nestsize , "n," ,     (long)paramsize , "p," , (long)bufsize , "b," , (long)savesize , 's' ) ; 
  1832.   } 
  1833. #endif /* STAT */
  1834.   while ( curs > -1 ) {
  1835.       
  1836.     if ( curs > 0 ) 
  1837.     {
  1838.       dvibuf [ dviptr ] = 142 ; 
  1839.       incr ( dviptr ) ; 
  1840.       if ( dviptr == dvilimit ) 
  1841.       dviswap () ; 
  1842.     } 
  1843.     else {
  1844.     
  1845.       {
  1846.     dvibuf [ dviptr ] = 140 ; 
  1847.     incr ( dviptr ) ; 
  1848.     if ( dviptr == dvilimit ) 
  1849.     dviswap () ; 
  1850.       } 
  1851.       incr ( totalpages ) ; 
  1852.     } 
  1853.     decr ( curs ) ; 
  1854.   } 
  1855.   if ( totalpages == 0 ) 
  1856.   printnl ( 690 ) ; 
  1857.   else {
  1858.       
  1859.     {
  1860.       dvibuf [ dviptr ] = 248 ; 
  1861.       incr ( dviptr ) ; 
  1862.       if ( dviptr == dvilimit ) 
  1863.       dviswap () ; 
  1864.     } 
  1865.     dvifour ( lastbop ) ; 
  1866.     lastbop = dvioffset + dviptr - 5 ; 
  1867.     dvifour ( 25400000L ) ; 
  1868.     dvifour ( 473628672L ) ; 
  1869.     preparemag () ; 
  1870.     dvifour ( eqtb [ 5284 ] .cint ) ; 
  1871.     dvifour ( maxv ) ; 
  1872.     dvifour ( maxh ) ; 
  1873.     {
  1874.       dvibuf [ dviptr ] = maxpush / 256 ; 
  1875.       incr ( dviptr ) ; 
  1876.       if ( dviptr == dvilimit ) 
  1877.       dviswap () ; 
  1878.     } 
  1879.     {
  1880.       dvibuf [ dviptr ] = maxpush % 256 ; 
  1881.       incr ( dviptr ) ; 
  1882.       if ( dviptr == dvilimit ) 
  1883.       dviswap () ; 
  1884.     } 
  1885.     {
  1886.       dvibuf [ dviptr ] = totalpages / 256 ; 
  1887.       incr ( dviptr ) ; 
  1888.       if ( dviptr == dvilimit ) 
  1889.       dviswap () ; 
  1890.     } 
  1891.     {
  1892.       dvibuf [ dviptr ] = totalpages % 256 ; 
  1893.       incr ( dviptr ) ; 
  1894.       if ( dviptr == dvilimit ) 
  1895.       dviswap () ; 
  1896.     } 
  1897.     while ( fontptr > 0 ) {
  1898.     
  1899.       if ( fontused [ fontptr ] ) 
  1900.       dvifontdef ( fontptr ) ; 
  1901.       decr ( fontptr ) ; 
  1902.     } 
  1903.     {
  1904.       dvibuf [ dviptr ] = 249 ; 
  1905.       incr ( dviptr ) ; 
  1906.       if ( dviptr == dvilimit ) 
  1907.       dviswap () ; 
  1908.     } 
  1909.     dvifour ( lastbop ) ; 
  1910.     {
  1911.       dvibuf [ dviptr ] = 2 ; 
  1912.       incr ( dviptr ) ; 
  1913.       if ( dviptr == dvilimit ) 
  1914.       dviswap () ; 
  1915.     } 
  1916.     k = 4 + ( ( dvibufsize - dviptr ) % 4 ) ; 
  1917.     while ( k > 0 ) {
  1918.     
  1919.       {
  1920.     dvibuf [ dviptr ] = 223 ; 
  1921.     incr ( dviptr ) ; 
  1922.     if ( dviptr == dvilimit ) 
  1923.     dviswap () ; 
  1924.       } 
  1925.       decr ( k ) ; 
  1926.     } 
  1927.     if ( dvilimit == halfbuf ) 
  1928.     writedvi ( halfbuf , dvibufsize - 1 ) ; 
  1929.     if ( dviptr > 0 ) 
  1930.     writedvi ( 0 , dviptr - 1 ) ; 
  1931.     printnl ( 691 ) ; 
  1932.     print ( outputfilename ) ; 
  1933.     print ( 155 ) ; 
  1934.     printint ( totalpages ) ; 
  1935.     print ( 692 ) ; 
  1936.     if ( totalpages != 1 ) 
  1937.     printchar ( 115 ) ; 
  1938.     print ( 693 ) ; 
  1939.     printint ( dvioffset + dviptr ) ; 
  1940.     print ( 694 ) ; 
  1941.     bclose ( dvifile ) ; 
  1942.   } 
  1943.   if ( jobname > 0 ) 
  1944.   {
  1945.     (void) putc('\n',  logfile );
  1946.     aclose ( logfile ) ; 
  1947.     selector = selector - 2 ; 
  1948.     if ( selector == 17 ) 
  1949.     {
  1950.       printnl ( 1120 ) ; 
  1951.       print ( logname ) ; 
  1952.       printchar ( 46 ) ; 
  1953.     } 
  1954.   } 
  1955.   println () ; 
  1956.   if ( ( editnamestart != 0 ) && ( interaction > 0 ) ) 
  1957.   calledit ( strpool , editnamestart , editnamelength , editline ) ; 
  1958. #ifdef DEBUG
  1959. debughelp () {
  1960.     /* 888 10 */ debughelp_regmem 
  1961.   integer k, l, m, n  ; 
  1962.   while ( true ) {
  1963.       
  1964.     wakeupterminal () ; 
  1965.     printnl ( 1128 ) ; 
  1966.     termflush ( stdout ) ; 
  1967.     read ( stdin , m ) ; 
  1968.     if ( m < 0 ) 
  1969.     return ; 
  1970.     else if ( m == 0 ) 
  1971.     dumpcore () ; 
  1972.     else {
  1973.     
  1974.       read ( stdin , n ) ; 
  1975.       switch ( m ) 
  1976.       {case 1 : 
  1977.     printword ( mem [ n ] ) ; 
  1978.     break ; 
  1979.       case 2 : 
  1980.     printint ( mem [ n ] .hh .v.LH ) ; 
  1981.     break ; 
  1982.       case 3 : 
  1983.     printint ( mem [ n ] .hh .v.RH ) ; 
  1984.     break ; 
  1985.       case 4 : 
  1986.     printword ( eqtb [ n ] ) ; 
  1987.     break ; 
  1988.       case 5 : 
  1989.     printword ( fontinfo [ n ] ) ; 
  1990.     break ; 
  1991.       case 6 : 
  1992.     printword ( savestack [ n ] ) ; 
  1993.     break ; 
  1994.       case 7 : 
  1995.     showbox ( n ) ; 
  1996.     break ; 
  1997.       case 8 : 
  1998.     {
  1999.       breadthmax = 10000 ; 
  2000.       depththreshold = poolsize - poolptr - 10 ; 
  2001.       shownodelist ( n ) ; 
  2002.     } 
  2003.     break ; 
  2004.       case 9 : 
  2005.     showtokenlist ( n , 0 , 1000 ) ; 
  2006.     break ; 
  2007.       case 10 : 
  2008.     print ( n ) ; 
  2009.     break ; 
  2010.       case 11 : 
  2011.     checkmem ( n > 0 ) ; 
  2012.     break ; 
  2013.       case 12 : 
  2014.     searchmem ( n ) ; 
  2015.     break ; 
  2016.       case 13 : 
  2017.     {
  2018.       read ( stdin , l ) ; 
  2019.       printcmdchr ( n , l ) ; 
  2020.     } 
  2021.     break ; 
  2022.       case 14 : 
  2023.     {register integer for_end; k = 0 ; for_end = n ; if ( k <= for_end) 
  2024.     do 
  2025.       print ( buffer [ k ] ) ; 
  2026.     while ( k++ < for_end ) ; } 
  2027.     break ; 
  2028.       case 15 : 
  2029.     {
  2030.       fontinshortdisplay = 0 ; 
  2031.       shortdisplay ( n ) ; 
  2032.     } 
  2033.     break ; 
  2034.       case 16 : 
  2035.     panicking = ! panicking ; 
  2036.     break ; 
  2037.     default: 
  2038.     print ( 63 ) ; 
  2039.     break ; 
  2040.       } 
  2041.     } 
  2042.   } 
  2043. #endif /* DEBUG */
  2044.